Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

Four table components used inline button arrays in column definitions while property-worker-table used a mat-menu dropdown template. This PR standardizes all Actions columns to follow the mat-menu pattern.

Changes

Refactored tables:

  • task-management-table (2 actions)
  • files-table (3 actions)
  • area-rules-table T3 and T10b variants (2 actions each)
  • task-tracker-table (2 conditional actions)

Pattern change:

// Before: Inline button definitions
{
  field: 'actions',
  type: 'button',
  buttons: [
    {type: 'icon', icon: 'edit', click: (row) => this.onEdit(row)}
  ]
}

// After: Template reference
{
  field: 'actions',
  pinned: 'right'
}
<!-- Template with mat-menu dropdown -->
<mtx-grid [cellTemplate]="{actions: actionsTpl}" ... />

<ng-template #actionsTpl let-row let-i="index">
  <button mat-icon-button [matMenuTriggerFor]="menu">
    <mat-icon>more_vert</mat-icon>
  </button>
  <mat-menu #menu="matMenu">
    <button mat-menu-item (click)="onEdit(row)">
      <mat-icon>edit</mat-icon>
      <span>{{ 'Edit' | translate }}</span>
    </button>
  </mat-menu>
</ng-template>

All existing IDs, CSS classes, click handlers, and conditional visibility logic preserved for test compatibility.

Original prompt

This section details on the original issue you should resolve

<issue_title>Change "Actions" to follow same style as all other tables</issue_title>
<issue_description>Use eform-client/src/app/plugins/modules/backend-configuration-pn/modules/property-workers/components/property-worker-table as implementation pattern to use.

The tables that needs to be refactored are these:
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-management/components/task-management-table
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/files/components/files-table
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/area-rules/components/area-rules-table
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Change Actions table to match other tables' style Standardize Actions column across tables to use mat-menu dropdown pattern Nov 6, 2025
Copilot AI requested a review from renemadsen November 6, 2025 06:02
Copilot finished work on behalf of renemadsen November 6, 2025 06:02
@renemadsen renemadsen marked this pull request as ready for review November 6, 2025 06:04
@renemadsen renemadsen merged commit 893181f into master Nov 6, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change "Actions" to follow same style as all other tables

2 participants